Foxit PDF SDK
FoxitPDFSDKPython3.ReadingOrder Class Reference
Inheritance diagram for FoxitPDFSDKPython3.ReadingOrder:
FoxitPDFSDKPython3.Base

Public Member Functions

def ReadingOrder (pdf_doc)
 Constructor.
More...
 
def AddOrderDataForRect (page_index, rect)
 Add order data for selected rect.
More...
 
def ApplyReadingOrder (page_index, selected_rect)
 Apply reading order to the specified page based on the given selected rectangle area(s).
More...
 
def CanMoveDataOrder (page_index, select_info_array, dest_move_item)
 Check whether data order can be moved.
More...
 
def CanSelectTableCellAtPoint (page, point)
 Check whether a table cell can be selected on mouse down at the given point.
More...
 
def ClearPageStructInfo (page)
 Clear page structure info.
More...
 
def DeleteOrderDataStructInfo (page, src_order_index_array, is_loaded)
 Delete order data structure info.
More...
 
def DrawReadingOrderItems (page_index)
 Draw reading order items for a specified page.
More...
 
def EndEditTable ()
 End edit table.
More...
 
def GenerateTableHeaderIDs ()
 Generate table header IDs.
More...
 
def GetAllLeafChildrenByContentItemID (content_tree, content_item_id)
 Get all leaf children by content item ID.
More...
 
def GetContentTree ()
 Get content tree.
More...
 
def GetCurrentTableHeaderIDs ()
 Get the array header ID of current table.
More...
 
def GetReadingOrderTreeItems ()
 Get reading order tree items.
More...
 
def GetSelectedTableCellAttributes ()
 Get selected table cell attributes.
More...
 
def GetTableSummary (page)
 Get table summary.
More...
 
def HasHeaderID (header_id)
 Check whether current table header ID is existing.
More...
 
def HasMissingHeaderIDs ()
 Check whether current table is missing header IDs.
More...
 
def IsEditingTable ()
 Check whether table editing has started.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 
def MoveOrderData (page_index, src_order_index_array, dest_order_index)
 Move data order.
More...
 
def RemoveOrderDataForRect (page_index, rect)
 Remove order data for selected rect.
More...
 
def SelectTableAtPoint (page_index, point)
 Select the table at the specified point on a page, if any.
More...
 
def SelectTableCellAtPoint (page, point, region_selected, appended)
 Select table cell by point on mouse up.
More...
 
def SelectTableCellAtRect (page, rect, region_selected, appended)
 Select table cell by rect on mouse up.
More...
 
def SetOrderTypeForSelectedContent (structure_type)
 Set order type for selected content.
More...
 
def SetOrderTypeForSelectedTreeItems (structure_type, select_info_array)
 Set order type for selected tree items.
More...
 
def SetReadingOrderOptions (options)
 Set reading order options.
More...
 
def SetSelectedTableCellAttributes (cell_attribute, change_id_enabled, need_change_ids)
 Set selected table cell attributes.
More...
 
def SetTableSummary (page, table_summary)
 Set table summary.
More...
 
def StartEditTable (page)
 Start edit table.
More...
 
def StartEditTableAtPoint (page, point)
 Start editing the table located at the specified point on a page, if any.
More...
 
def SynchronizeTable ()
 Synchronize table.
More...
 

Static Public Attributes

 e_StructureTypeBackgroundOrArtifact = _fsdk.ReadingOrder_e_StructureTypeBackgroundOrArtifact
 Structure type: background or artifact.

 
 e_StructureTypeCaption = _fsdk.ReadingOrder_e_StructureTypeCaption
 Structure type: caption.

 
 e_StructureTypeCell = _fsdk.ReadingOrder_e_StructureTypeCell
 Structure type: cell.

 
 e_StructureTypeFigure = _fsdk.ReadingOrder_e_StructureTypeFigure
 Structure type: figure.

 
 e_StructureTypeFigureOrCaption = _fsdk.ReadingOrder_e_StructureTypeFigureOrCaption
 Structure type: figure or caption.

 
 e_StructureTypeFormfield = _fsdk.ReadingOrder_e_StructureTypeFormfield
 Structure type: form field.

 
 e_StructureTypeFormula = _fsdk.ReadingOrder_e_StructureTypeFormula
 Structure type: formula.

 
 e_StructureTypeH1 = _fsdk.ReadingOrder_e_StructureTypeH1
 Structure type: H1.

 
 e_StructureTypeH2 = _fsdk.ReadingOrder_e_StructureTypeH2
 Structure type: H2.

 
 e_StructureTypeH3 = _fsdk.ReadingOrder_e_StructureTypeH3
 Structure type: H3.

 
 e_StructureTypeH4 = _fsdk.ReadingOrder_e_StructureTypeH4
 Structure type: H4.

 
 e_StructureTypeH5 = _fsdk.ReadingOrder_e_StructureTypeH5
 Structure type: H5.

 
 e_StructureTypeH6 = _fsdk.ReadingOrder_e_StructureTypeH6
 Structure type: H6.

 
 e_StructureTypeNote = _fsdk.ReadingOrder_e_StructureTypeNote
 Structure type: note.

 
 e_StructureTypeReference = _fsdk.ReadingOrder_e_StructureTypeReference
 Structure type: reference.

 
 e_StructureTypeTable = _fsdk.ReadingOrder_e_StructureTypeTable
 Structure type: table.

 
 e_StructureTypeText = _fsdk.ReadingOrder_e_StructureTypeText
 Structure type: text.

 
 e_TableSelectResultNone = _fsdk.ReadingOrder_e_TableSelectResultNone
 Table select result : none.

 
 e_TableSelectResultNoTableExist = _fsdk.ReadingOrder_e_TableSelectResultNoTableExist
 Table select result : no table exist.

 
 e_TableSelectResultNotInTable = _fsdk.ReadingOrder_e_TableSelectResultNotInTable
 Table select result : not in table.

 
 e_TableSelectResultNotSamePage = _fsdk.ReadingOrder_e_TableSelectResultNotSamePage
 Table select result : not same page.

 
 e_TableSelectResultNotStarted = _fsdk.ReadingOrder_e_TableSelectResultNotStarted
 Table select result : not started.

 

Detailed Description

This class represents a reading order for PDF document accessibility reading order operations. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function FoxitPDFSDKPython3.Library.Initialize with a key including "Accessibility" module.

See also
FoxitPDFSDKPython3.Library

Constructor & Destructor Documentation

◆ ReadingOrder()

def FoxitPDFSDKPython3.ReadingOrder.ReadingOrder (   pdf_doc)

Constructor.

Constructor, with another reading order object.

Parameters
[in]pdf_docA valid PDF document object.
[in]otherAnother reading order object.

Member Function Documentation

◆ AddOrderDataForRect()

def FoxitPDFSDKPython3.ReadingOrder.AddOrderDataForRect (   page_index,
  rect 
)

Add order data for selected rect.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
[in]rectThe selected rect.
Returns
The updated order rect array.

◆ ApplyReadingOrder()

def FoxitPDFSDKPython3.ReadingOrder.ApplyReadingOrder (   page_index,
  selected_rect 
)

Apply reading order to the specified page based on the given selected rectangle area(s).

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
[in]selected_rectThe array of selected rects which define the area(s) to be used for applying reading order.
Returns
true means success, while false means not.

◆ CanMoveDataOrder()

def FoxitPDFSDKPython3.ReadingOrder.CanMoveDataOrder (   page_index,
  select_info_array,
  dest_move_item 
)

Check whether data order can be moved.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
[in]select_info_arrayThe selected info array.
[in]dest_move_itemThe destination move item.
Returns
true means data order can be moved, while false means not.

◆ CanSelectTableCellAtPoint()

def FoxitPDFSDKPython3.ReadingOrder.CanSelectTableCellAtPoint (   page,
  point 
)

Check whether a table cell can be selected on mouse down at the given point.

Parameters
[in]pageA PDF page object.
[in]pointThe point, in the PDF coordinate system (PDFPage).
Returns
The table select result. Please refer to values starting from FoxitPDFSDKPython3.ReadingOrder.e_TableSelectResultNone .

◆ ClearPageStructInfo()

def FoxitPDFSDKPython3.ReadingOrder.ClearPageStructInfo (   page)

Clear page structure info.

Parameters
[in]pageThe PDF page object.
Returns
None.

◆ DeleteOrderDataStructInfo()

def FoxitPDFSDKPython3.ReadingOrder.DeleteOrderDataStructInfo (   page,
  src_order_index_array,
  is_loaded 
)

Delete order data structure info.

Parameters
[in]pageThe PDF page object.
[in]src_order_index_arrayThe source order index array.
[in]is_loadedWhether the page is loaded.
Returns
The deleted count.

◆ DrawReadingOrderItems()

def FoxitPDFSDKPython3.ReadingOrder.DrawReadingOrderItems (   page_index)

Draw reading order items for a specified page.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
Returns
true means success, while false means not.

◆ EndEditTable()

def FoxitPDFSDKPython3.ReadingOrder.EndEditTable ( )

End edit table.

Returns
true means success, while false means not.

◆ GenerateTableHeaderIDs()

def FoxitPDFSDKPython3.ReadingOrder.GenerateTableHeaderIDs ( )

Generate table header IDs.

Returns
true means success, while false means not.

◆ GetAllLeafChildrenByContentItemID()

def FoxitPDFSDKPython3.ReadingOrder.GetAllLeafChildrenByContentItemID (   content_tree,
  content_item_id 
)

Get all leaf children by content item ID.

Parameters
[in]content_treeThe content tree.
[in]content_item_idThe content item ID.
Returns
The array of leaf children IDs.

◆ GetContentTree()

def FoxitPDFSDKPython3.ReadingOrder.GetContentTree ( )

Get content tree.

Returns
The array of content tree items.

◆ GetCurrentTableHeaderIDs()

def FoxitPDFSDKPython3.ReadingOrder.GetCurrentTableHeaderIDs ( )

Get the array header ID of current table.

Returns
The array of header ID.

◆ GetReadingOrderTreeItems()

def FoxitPDFSDKPython3.ReadingOrder.GetReadingOrderTreeItems ( )

Get reading order tree items.

Returns
The array of reading order tree items.

◆ GetSelectedTableCellAttributes()

def FoxitPDFSDKPython3.ReadingOrder.GetSelectedTableCellAttributes ( )

Get selected table cell attributes.

Returns
The array of cell attribute objects.

◆ GetTableSummary()

def FoxitPDFSDKPython3.ReadingOrder.GetTableSummary (   page)

Get table summary.

Parameters
[in]pageThe PDF page object.
Returns
The table summary text.

◆ HasHeaderID()

def FoxitPDFSDKPython3.ReadingOrder.HasHeaderID (   header_id)

Check whether current table header ID is existing.

Parameters
[in]header_idThe header ID to check.
Returns
true means the header ID is existing, while false means not.

◆ HasMissingHeaderIDs()

def FoxitPDFSDKPython3.ReadingOrder.HasMissingHeaderIDs ( )

Check whether current table is missing header IDs.

Returns
true means current table is missing header IDs, while false means not.

◆ IsEditingTable()

def FoxitPDFSDKPython3.ReadingOrder.IsEditingTable ( )

Check whether table editing has started.

Returns
true means table editing has started, while false means not.

◆ IsEmpty()

def FoxitPDFSDKPython3.ReadingOrder.IsEmpty ( )

Check whether current object is empty or not.

Returns
true means current object is empty, while false means not.

◆ MoveOrderData()

def FoxitPDFSDKPython3.ReadingOrder.MoveOrderData (   page_index,
  src_order_index_array,
  dest_order_index 
)

Move data order.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
[in]src_order_index_arrayThe source order index array.
[in]dest_order_indexThe destination order index.
Returns
The moved count.

◆ RemoveOrderDataForRect()

def FoxitPDFSDKPython3.ReadingOrder.RemoveOrderDataForRect (   page_index,
  rect 
)

Remove order data for selected rect.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
[in]rectThe selected rect.
Returns
The updated order rect array.

◆ SelectTableAtPoint()

def FoxitPDFSDKPython3.ReadingOrder.SelectTableAtPoint (   page_index,
  point 
)

Select the table at the specified point on a page, if any.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFDoc.GetPageCount .
[in]pointThe point used to locate the table, in PDF page coordinate system.
Returns
true means a table is found and selected at the specified point, while false means not.

◆ SelectTableCellAtPoint()

def FoxitPDFSDKPython3.ReadingOrder.SelectTableCellAtPoint (   page,
  point,
  region_selected,
  appended 
)

Select table cell by point on mouse up.

Parameters
[in]pageA PDF page object.
[in]pointThe point.
[out]region_selectedThe selected region array.
[in]appendedWhether to append the selection.
Returns
The table select result. Please refer to values starting from FoxitPDFSDKPython3.ReadingOrder.e_TableSelectResultNone .

◆ SelectTableCellAtRect()

def FoxitPDFSDKPython3.ReadingOrder.SelectTableCellAtRect (   page,
  rect,
  region_selected,
  appended 
)

Select table cell by rect on mouse up.

Parameters
[in]pageA PDF page object.
[in]rectThe rectangular area .
[out]region_selectedThe selected region array.
[in]appendedWhether to append the selection.
Returns
The table select result. Please refer to values starting from FoxitPDFSDKPython3.ReadingOrder.e_TableSelectResultNone .

◆ SetOrderTypeForSelectedContent()

def FoxitPDFSDKPython3.ReadingOrder.SetOrderTypeForSelectedContent (   structure_type)

Set order type for selected content.

Parameters
[in]structure_typeThe structure type. Please refer to values starting from and this should be one of these values.
Returns
true means success, while false means not.

◆ SetOrderTypeForSelectedTreeItems()

def FoxitPDFSDKPython3.ReadingOrder.SetOrderTypeForSelectedTreeItems (   structure_type,
  select_info_array 
)

Set order type for selected tree items.

Parameters
[in]structure_typeThe structure type. Please refer value .
[in]select_info_arrayThe selected info array.
Returns
true means success, while false means not.

◆ SetReadingOrderOptions()

def FoxitPDFSDKPython3.ReadingOrder.SetReadingOrderOptions (   options)

Set reading order options.

Parameters
[in]optionsThe reading order options. Please refer to ReadingOrderOptions .
Returns
None.

◆ SetSelectedTableCellAttributes()

def FoxitPDFSDKPython3.ReadingOrder.SetSelectedTableCellAttributes (   cell_attribute,
  change_id_enabled,
  need_change_ids 
)

Set selected table cell attributes.

Parameters
[in]cell_attributeThe cell attribute to set.
[in]change_id_enabledWhether to enable changing Id.
[in]need_change_idsWhether to change IDs.
Returns
true means success, while false means not.

◆ SetTableSummary()

def FoxitPDFSDKPython3.ReadingOrder.SetTableSummary (   page,
  table_summary 
)

Set table summary.

Parameters
[in]pageThe PDF page object.
[in]table_summaryThe table summary text.
Returns
true means success, while false means not.

◆ StartEditTable()

def FoxitPDFSDKPython3.ReadingOrder.StartEditTable (   page)

Start edit table.

Parameters
[in]pageThe PDF page object.
Returns
true means success, while false means not.

◆ StartEditTableAtPoint()

def FoxitPDFSDKPython3.ReadingOrder.StartEditTableAtPoint (   page,
  point 
)

Start editing the table located at the specified point on a page, if any.

Parameters
[in]pageThe PDF page object.
[in]pointThe point used to locate the table to be edited, in the PDF coordinate system (PDFPage).
Returns
true means a table is found at the specified point and editing has started successfully, while false means not.

◆ SynchronizeTable()

def FoxitPDFSDKPython3.ReadingOrder.SynchronizeTable ( )

Synchronize table.

Returns
None.